<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('records', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('contact_id')->nullable()->comment('联系人');
            $table->integer('template_id')->nullable()->comment('短信模板');
            $table->string('params')->nullable()->comment('额外参数');
            $table->string('smsid')->nullable()->comment('短信发送流水号');
            $table->string('msg')->nullable()->comment('发送结果');
            $table->integer('status')->default('0')->comment('发送状态');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('records');
    }
}
